package sis.util;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-07-30 10:13
 * @notify
 * @version 1.0
 */


import junit.framework.Assert;

import java.io.File;

public class TestUtil {
    //检查文件是否存在
    public static void assertGone(String... filenames) {
        for (String filename : filenames) {
            Assert.assertFalse(new File(filename).exists());
        }
    }

    //如果文件存在则删除
    public static void delete(String filename) {
        File file = new File(filename);
        if (file.exists()) {
            Assert.assertTrue(file.delete());
        }
    }
}
